Skip to content

fix(capabilities): read host_compat from package.json after 2026.6 repackage#401

Open
minion1227 wants to merge 1 commit into
vouchdev:testfrom
minion1227:fix/host-compat-read-from-package-json
Open

fix(capabilities): read host_compat from package.json after 2026.6 repackage#401
minion1227 wants to merge 1 commit into
vouchdev:testfrom
minion1227:fix/host-compat-read-from-package-json

Conversation

@minion1227

Copy link
Copy Markdown
Contributor

what changed

_load_host_compat() (and the #237 drift tests) now read openclaw.compat.pluginApi from package.json instead of openclaw.plugin.json.

why

two PRs collided on test. the #237 host-compat feature reads the pluginApi floor from openclaw.plugin.json. the 2026.6 openclaw repackage (47ac72f) then moved that floor into the new loader-facing package.json — its commit message is explicit that the current loader ignores openclaw.plugin.json's openclaw.* fields, so package.jsonopenclaw.compat.pluginApi is now the single source of truth.

result on test today: _load_host_compat() reads a key that no longer exists, host_compat silently degrades to {}, and both drift tests fail:

  • test_capabilities_host_compat_matches_openclaw_manifestKeyError: 'openclaw'
  • test_capabilities_host_compat_present_and_nonemptyassert 'openclaw' in {}

this points the reader and the tests at package.json where the floor now lives, restoring the drift check. graceful-degradation on a missing/malformed manifest is preserved (those tests move with it).

what might break

nothing on disk or on the wire. host_compat now reports {"openclaw": {"pluginApi": ">=2026.6.0"}} again instead of {}. standalone-wheel installs without package.json still degrade to {} (covered by test).

tests

  • pytest tests/test_capabilities.py — 5/5 green
  • ruff check src tests — clean
  • mypy src — clean
  • full pytest (minus embeddings) — green

…package

the vouchdev#237 host-compat drift check read openclaw.compat.pluginApi from
openclaw.plugin.json, but the 2026.6 loader repackage (47ac72f) moved
that floor into the new loader-facing package.json — the current openclaw
parser ignores openclaw.plugin.json's openclaw.* fields entirely. so
_load_host_compat() read a key that no longer existed, host_compat
silently degraded to {}, and the two drift tests failed on test.

point _load_host_compat() and the drift tests at package.json, where the
pluginApi floor now lives. the graceful-degradation and malformed-json
tests move with it. no behaviour change beyond reading the right file.
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@plind-junior, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e7f43b91-88da-43fa-8c25-4bec0d717356

📥 Commits

Reviewing files that changed from the base of the PR and between 2fb255a and 2769c4d.

📒 Files selected for processing (2)
  • src/vouch/capabilities.py
  • tests/test_capabilities.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added mcp mcp, jsonl, and http surfaces tests tests and fixtures size: S 50-199 changed non-doc lines labels Jul 6, 2026
@minion1227

Copy link
Copy Markdown
Contributor Author

merge-order note: please merge this PR before #297 and #301.

all three carry the same one-line host_compat fix (#297 and #301 have it folded in so their ci goes green against the current, still-broken test). this pr is the canonical, single-purpose fix. if #297/#301 merge first, this one looks redundant and risks being closed — merging it first keeps it as the source of the fix, and #297/#301 then merge cleanly on top (identical content dedups, no conflict).

@plind-junior

Copy link
Copy Markdown
Member

Fix the conflict

@minion1227

Copy link
Copy Markdown
Contributor Author

update — please disregard the earlier "merge this first" note.

test has since landed an equivalent host_compat fix independently (host_compat now reads openclaw.compat.pluginApi from package.json), so this pr's change is already present on the base. this branch is also now well behind test, so merging it as-is would revert unrelated additions. do not merge — it's kept open intentionally rather than closed. no action needed here.

@plind-junior

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mcp mcp, jsonl, and http surfaces size: S 50-199 changed non-doc lines tests tests and fixtures

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants